<!DOCTYPE html>
<html ms-controller="EasyApps">
<head>
<meta charset="utf-8" />
<title>EasyApps</title>

<meta name="description" content="Dashboard" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<load href="assets/css/bootstrap.min.css"  />
<load href="assets/css/font-awesome.min.css" />
<load href="assets/css/weather-icons.min.css" />

<load href="assets/css/beyond.min.css"  />
<load href="assets/css/typicons.min.css" />
<load href="assets/css/animate.min.css" />
<load href="assets/jquery.min.js" />

<load href="assets/layer/layer.min.js" />

<script src="assets/js/bootstrap.min.js"></script>
<load href="assets/daterangepicker/moment.min.js" />
<load href="assets/daterangepicker/daterangepicker.js" />
<load href="assets/daterangepicker/daterangepicker.css" />
</head>
<body>
<style type="text/css">
input.invalid, textarea.invalid, select.invalid {
    border-color: red;
}
.page-sidebar:before,.page-sidebar{
    width: 170px;
}
.page-content{
    margin-left: 170px;
}
.fileinput{
    cursor: pointer;
}
.page-body{
    max-width: 1091px;
    background-image: url('assets/bg2.jpg');
}
</style>

<div class="main-container container-fluid">
    <div class="page-container">
        <div id="sidebar" class="page-sidebar">
            
            <ul class="nav sidebar-menu">
                <li data-mod="Index">
                    <a class="btn-gohome" href="{:U('Index/index')}">
                        <i class="menu-icon glyphicon glyphicon-home"></i>
                        <span class="menu-text">我的应用</span>
                    </a>
                </li>
            <empty name="apid">
                <li >
                    <a dialog-title="新建APP" ajax-dialog href="{:U('Apps/addApps')}">
                        <i class="menu-icon glyphicon glyphicon-list-alt"></i>
                        <span class="menu-text">新建APP</span>
                    </a>
                </li>
            <else/>
                <li data-mod="Page">
                    <a href="{:U("Page/index?apid=$apid")}">
                        <i class="menu-icon glyphicon glyphicon-th-large"></i>
                        <span class="menu-text">页面</span>
                    </a>
                </li>
                <li data-mod="Content">
                    <a href="{:U("Content/index?apid=$apid")}">
                        <i class="menu-icon glyphicon glyphicon-list-alt"></i>
                        <span class="menu-text">内容</span>
                    </a>
                </li>
<!--
                <li data-mod="User">
                    <a href="{:U("User/index?apid=$apid")}">
                        <i class="menu-icon fa fa-users"></i>
                        <span class="menu-text">用户</span>
                    </a>
                </li>
-->
                
                <li data-mod="ApiColud">
                    <a href="#" class="menu-dropdown">
                        <i class="menu-icon glyphicon glyphicon-link"></i>
                        <span class="menu-text">ApiColud
                        </span>
                        <i class="menu-expand"></i>
                    </a>
                    <ul class="submenu" >
                        <li data-ac="style">
                            <a  href="{:U("ApiColud/style?apid=$apid")}">
                                <span class="menu-text">界面风格</span>
                            </a>
                        </li>
                        
                        <li data-ac="introPages">
                            <a  href="{:U("ApiColud/introPages?apid=$apid")}">
                                <span class="menu-text">引导页面</span>
                            </a>
                        </li>
                        
                        <li data-ac="index">
                            <a  href="{:U("ApiColud/index?apid=$apid")}">
                                <span class="menu-text">APP配置</span>
                            </a>
                        </li>
                        <li data-ac="func">
                            <a href="{:U("ApiColud/func?apid=$apid")}">
                                <span class="menu-text">功能选择</span>
                            </a>
                        </li>
                        <li data-ac="publish">
                            <a  href="{:U("ApiColud/publish?apid=$apid")}">
                                <span class="menu-text">发布</span>
                            </a>
                        </li>
                    </ul>
                </li>
                </empty>
                <li>
                    
                </li>
            </ul>
            <div style="position:relative;color:#000;z-index:999" class="alert">
                    <p>登录时间:{$user.login_time|toDatetime}</p>
                    <p>登录IP:{$user.login_ip}</p>
                    <p>
                        <a class="btn btn-danger  btn-block" href="{:U('Public/logout')}">退出</a>
                    </p>
            </div>
        </div>
        <div class="page-content">
            <div class="page-header position-relative">
                <div class="header-title">
                    <h1>
                        <notempty name="ap">
                        当前应用:[{$ap.name}],<a href="{:U("ApiColud/style?apid=$apid")}">设置界面风格</a>
                        </notempty>
                    </h1>
                </div>
            </div>
            <div class="page-body">
                <div class="row">
                <block name="content">
                </block>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
$(function(){
    $('[data-mod={$con}]').addClass('active');
    var sub = $('[data-mod={$con}]').find('[data-ac={$ac}]');
    if (sub.length > 0) {
        $('[data-mod={$con}]').removeClass('active').addClass('open');
        sub.addClass('active');
    };
    $('li[weid={$weid}]').addClass('active');
    $('.btn-gohome').on('click',function(e){
        e.preventDefault();
        window.parent.location.href = 'user.php';
    })

    $('.btn-func').on('click',function(e){
        e.preventDefault();
        var weid = $(this).attr('data-id');
        // window.parent.initWe(weid);
        // var href = $(this).attr('href');

        var h = window.parent.location.href;
        h = urlParas(h).set({'weid':weid});
        console.log(h);
        window.parent.location.href = h;
    })
})
</script>

<script src="assets/js/toastr.js"></script>
<load href="assets/editable/css/bootstrap-editable.css"  />
<load href="assets/editable/js/bootstrap-editable.min.js"  />
<load href="assets/jquery.bootstrap-growl.js" />
<load href="assets/nprogress/nprogress.css" />
<load href="assets/nprogress/nprogress.js" />
<load href="assets/bootstrap-confirmation.js" />
<load href="assets/bootstrap-dialog.js" />
<load href="assets/UrlParas.js" />
<load href="assets/validval.js" />
<load href="assets/tp.js" />
</body>
</html>
